import { NoSkinCellRenderer } from "../../../common/item/NoSkinCellRenderer";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { ObjCreate } from "../../../common/ObjCreate";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { SPlayerResult } from "../../../../../../Message/Public/SPlayerResult";
import { EForce } from "../../../../../../Message/Public/EForce";
import { HTMLUtil } from "../../../../../../com/gengine/utils/HTMLUtil";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
type int = number;
//class RobFlagRankCellRender
    
    export  class RobFlagRankCellRender extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        protected /* override */ createChildren(): void
        {
            var loc1=GlobalStyle.textFormat1;
            loc1.align = flash.text.TextFormatAlign.CENTER;
            this._txtName = ObjCreate.createGTextField("", 12, this.txtY, 100, 20, this, loc1);
            this._txtKill = ObjCreate.createGTextField("", 83, this.txtY, 100, 20, this, loc1);
            this._txtDead = ObjCreate.createGTextField("", 141, this.txtY, 100, 20, this, loc1);
            this._txtRob = ObjCreate.createGTextField("", 227, this.txtY, 100, 20, this, loc1);
            this._txtBack = ObjCreate.createGTextField("", 330, this.txtY, 100, 20, this, loc1);
            this._txtBonus = ObjCreate.createGTextField("", 394, this.txtY, 100, 20, this, loc1);
            ObjCreate.createBg(3, 20, 514, 1, this, ImagesConst.SplitLine);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            this._myData = arg1 as SPlayerResult;
            var loc1=GlobalStyle.red;
            if (this._myData.force == EForce._EForceTwo) 
            {
                loc1 = GlobalStyle.blue;
            }
            this._txtName.htmlText = HTMLUtil.addColor(this._myData.name, loc1);
            this._txtKill.htmlText = HTMLUtil.addColor(this._myData.killPlayer.toString(), loc1);
            this._txtDead.htmlText = HTMLUtil.addColor(this._myData.deathTimes.toString(), loc1);
            this._txtRob.htmlText = HTMLUtil.addColor(this._myData.robTimes.toString(), loc1);
            this._txtBack.htmlText = HTMLUtil.addColor(this._myData.returnTimes.toString(), loc1);
            this._txtBonus.htmlText = HTMLUtil.addColor(this._myData.honour.toString(), loc1);
            return;
        }

        /* internal */ /* const */txtY: int=3;

        /* internal */ /* var */_txtName: GTextFiled;

        /* internal */ /* var */_txtKill: GTextFiled;

        /* internal */ /* var */_txtDead: GTextFiled;

        /* internal */ /* var */_txtRob: GTextFiled;

        /* internal */ /* var */_txtBack: GTextFiled;

        /* internal */ /* var */_txtBonus: GTextFiled;

        /* internal */ /* var */_myData: SPlayerResult;
    }
